package org.i1510.joeone.dao;
import org.i1510.common.dao.IBaseJpaDao;
import org.i1510.joeone.po.JoeoneVote;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
@Repository
public interface IJoeoneVoteDao extends IBaseJpaDao<JoeoneVote, String>{    
    /**
    *@Author Rambo
    *@Desc：根据创建者 AND 短码 获取投票信息
    *@param docCreator
    *@param jcodeId
    *@return TODO
    *@Version  IJoeoneVoteDao.java,v 1.1 2015年6月16日 下午3:23:24 
    */
    @Query("SELECT a from JoeoneVote a WHERE a.docCreator =:docCreator AND a.jcodeId =:jcodeId ") 
    public JoeoneVote findByUserAndCode(@Param("docCreator")String docCreator,@Param("jcodeId")String jcodeId); 
/********************以下是标准接口*********************************************************/    
    @Query("SELECT a from JoeoneVote a WHERE a.docId =:docId") 
     public JoeoneVote findById(@Param("docId")String docId); 
/********************以上是标准接口*********************************************************/    
}
 